package com.css.influence.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.css.influence.entity.SettingSeismicInfluenceflied;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Dbj
 * @date 2024年09月07日  11:48
 */
@Mapper
@DS("slave")
public interface InfluenceMapper extends BaseMapper<SettingSeismicInfluenceflied> {
    @Select("select st_astext(#{geom})")
    String selectGeomText(String geom);

    @Select("select *,st_astext(geom) geomText from setting_seismic_influenceflied where earth_quake_id=#{earthId} and version=#{version} order by dz_intensity ")
    List<SettingSeismicInfluenceflied> selectInfluence(@Param("earthId") String earthId, @Param("version") String version);

    @Select("select distinct version,type from setting_seismic_influenceflied where earth_quake_id=#{earthId} order by dz_intensity")
    List<SettingSeismicInfluenceflied> selectListByCondition( String earthId);

    void selectListByConditionCurrent(String earthId);
}
